﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using BusinessLogicLayer;
using DataAccessComponents;

namespace inzDesktop
{
    /// <summary>
    /// Interaction logic for windowStatus.xaml
    /// </summary>
    public partial class windowStatus : Window
    {
        public Status Status { get; set; }
        public windowStatus()
        {
            InitializeComponent();
            inicjalizujZawartosc();
        }

        public void inicjalizujZawartosc()
        {
            StatusBL statusBL = new StatusBL();
            cbStatus.ItemsSource = statusBL.pobierzListe();

        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.Status = cbStatus.SelectedItem as Status;
            DialogResult = true;
        }

        private void btnAnuluj_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }
    }
}
